package com.sgroup.studycountry.domain.repository;

import com.sgroup.studycountry.domain.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * 用户repo
 *
 * @author umi
 * @date 2021/10/27 19:29
 */
@Repository
public interface UserRepository extends JpaRepository<User, String> {
    /**
     * 通过手机号码查询
     *
     * @param phoneNumber 手机号码
     * @return User
     */
    Optional<User> getByPhoneNumber(String phoneNumber);
}
